package com.cn.xcsharp;

import com.cn.xcsharp.common.websocket.WebSocket;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@SpringBootApplication
public class XcsharpApplication {

    public static void main(String[] args) {
//        SpringApplication.run(XcsharpApplication.class, args);

        SpringApplication springApplication = new SpringApplication(XcsharpApplication.class);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
//        HttpVeStoreCompany.setApplicationContext(configurableApplicationContext);//解决不能注入的问题（访问不了数据库问题）
        WebSocket.setApplicationContext(configurableApplicationContext);//解决WebSocket不能注入的问题（访问不了数据库问题）
//        TimeTask.setApplicationContext(configurableApplicationContext);//解决TimeTask不能注入的问题（访问不了数据库问题）
    }

}
